﻿using System;
using netCoreStudy.Enum;

namespace netCoreStudy.Attr.QueryAttr
{
	/// <summary>
	/// 动态 拼 where.(x=>x.xxx) 表达式树
	/// </summary>
	[AttributeUsage(AttributeTargets.Property)]
	public class WhereAttribute : Attribute
	{
		/// <summary>
		/// 查询方式  大于 等于 like 
		/// </summary>
		public QueryType Query { get; set; }

		/// <summary>
		/// 属性名称,用于对比查询
		/// </summary>
		public string DisplayName { get; set; }

		/// <summary>
		/// 多字段 模糊查询,只支持string 类型 ,多个用逗号 分开 
		/// </summary>
		public string Blurry { get; set; }

		public WhereAttribute()
		{
		}

		public WhereAttribute(QueryType query, string displayName)
		{
			Query = query;
			DisplayName = displayName;
		}
	}
}